package org.ligson.fwc.core.service;


import org.ligson.fwc.core.entity.BasicEntity;
import org.ligson.fwc.core.entity.Pagination;

import java.io.Serializable;

/**
 * Created by ligson on 2016/3/21.
 * 通用接口代码
 */
public interface BaseService<T extends BasicEntity, PK extends Serializable> {

    T get(PK primaryKey);

    Pagination<T> findAllBy(T t);

    T findBy(T t);

    int countBy(T t);

    void delete(T t);

    void deleteByPrimaryKey(PK pk);

    void update(T t);

    void updateByPrimaryKey(T t);

    void add(T t);

    Pagination<T> likeAllBy(T entityCond);
}
